package 公司真题.携程;

import java.util.Arrays;
import java.util.Scanner;

public class _求中位数 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine().trim();
        String[] strArr = str.split(",");
        int[] arr = new int[strArr.length];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = Integer.parseInt(strArr[i]);
        }
        Arrays.sort(arr);
        int mid = (arr.length - 1) >> 1;
        System.out.println(arr[mid]);
    }

    private void quickSort() {

    }
}
